Sd switchbox in a cellular handset

ABSTRACT

A method for arbitrating between a host device and a cellular base band mode for use of a shared SD storage, including requesting, by a cellular base band modem from a host device, access to an SD storage, including writing an access request message, notifying the host device of the access request message, reading, by the host device, the access request message, granting, by the host device, the access request, including writing an access grant message, notifying the cellular base band modem of the access grant message, reading, by the cellular base band mode, the access grant message, holding an SD host bus in a busy state, thereby forcing the host device to hold and not access the bus, accessing, by the cellular base band modem, the SD storage, and upon completion of the accessing, removing the busy state from the SD host bus.

PRIORITY REFERENCE TO RELATED APPLICATIONS

This application claims benefit of U.S. Provisional Application No.60/933,792, entitled SD SWITCH BOX IN A CELLULAR HANDSET, filed on Jun.8, 2007 by inventors Itay Sherman, Eyal Bychkov and Yaron Segalov.

FIELD OF THE INVENTION

The field of the present invention is cellular modems.

BACKGROUND OF THE INVENTION

Today's conventional cellular handset includes a cellular base bandmodem. The base band modem does not have built-in non-volatile memory,and has limited internal volatile memory (SRAM). For use of non-volatilememory, a cellular modem may be connected to a NOR flash memory, andalso to additional external SDRAM.

When booting up, a cellular modem generally accesses the NOR flashmemory to execute a code image that is stored therein. The cellularmodem may access such code image directly, or by first copying it to itsinternal SRAM.

Many cellular modems also support a peripheral boot mode, through whichthey load a secondary code image from an external port, such as a UARTport or a USB port, which is connected to an external device, such as aPC computer, which loads the secondary code image via a peripheralinterface. The secondary code image is then used to re-program the NORflash memory with new image code. Peripheral boot mode is typically usedfor program development and debugging via a PC.

High end cellular handsets also have NAND flash memory coupled thereto.In such case, the NAND flash memory is used for code and data storage.The NAND flash memory is connected via a dedicated NAND controllerembedded in the cellular base band modem, or via an SD bus to anexternal SD controller that is connected to the NAND flash. For cellularhandsets that have NAND flash memory, access to the NAND flash isperformed via the cellular base band modem.

Cellular handsets may support connection to an external device host,such as a PC computer. In such case, the handset provides the hostaccess to its internal NAND flash memory. Host access to NAND flashmemory is generally performed over a USB connection, where the internalNAND memory is mapped as a mass storage drive on the host. The handsetthus operates as a USB device, which is a slave, and the host operatesas a USB host, which is a master.

Reference is now made to FIG. 1, which is a simplified block diagram ofa prior art cellular handset 100. Handset 100 includes a cellular baseband modem 110 with an external memory interface (EMIF) 120 foraccessing a NAND flash storage 130 and an SDRAM storage 140.Correspondingly, EMIF 120 includes a NAND controller 150 and an SDRAMcontroller 160, respectively.

Many consumer electronic (CE) devices, such as MP3 song players and MP4movie players, support connection to non-volatile storage elements, themost common storage element being SD memory and its variants includinginter alia Mini SD and Micro SD. The CE device operates as a host, whichis a master, and the SD memory operates as a slave.

It would thus be desirable to be able to connect CE devices that supportSD connections with cellular modems, in order to enhance the CE deviceswith modem functionality. However, many challenges have to be overcomein doing so. Some of these challenges are:

-   -   How is the cellular modem booted up?    -   How does the CE device communicate with the cellular modem?    -   How is the cellular modem transition in and out of sleep mode        carried out?    -   How are conflicts resolved when both the CE device and the        cellular modem want to access SD memory at the same time?

SUMMARY OF THE DESCRIPTION

Aspects of the present invention concern a design for a cellular handsetthat is connected to a CE host device, and enhances the CE device withmodem functionality. The CE host device supports SD connection. Examplesof such host devices abound and include inter alia digital cameras,personal data assistants (PDAs), MP3 music players, MP4 movie players,TVs with SD slots, laptop PCs and GPS navigational systems.

In addition to enhancing the CE host with modem functionality,connection of the cellular handset to the CE host also serves to enhancethe host with the storage capabilities of the modem.

The special design of the present invention enables a cellular base bandmodem within the handset to bypass NOR flash memory when booting up,enables communication between the cellular base band modem and the CEhost, and enables the cellular base band modem to switch in and out ofsleep mode without loss of state parameters and code image.

In accordance with an embodiment of the present invention, a convergencecontroller is used to couple the CE host device with the handset'scellular base band modem and with the handset's NAND flash memory. Theconvergence controller serves as an SD switch box, which connects two SDdevices, namely, the cellular base band modem and the CE device, andenables switching access to SD storage between the two SD devices.

The convergence controller includes a communication mechanism throughwhich the cellular base band modem and the CE host device communicatewith one another. Such communication mechanism includes a first mailboxvia which the cellular base band modem sends a message to the CE host,and a second mailbox via which the CE host sends a message to thecellular base band modem.

The two mailboxes are used to resolve conflicts when both the CE hostand the cellular base band modem want to access SD memory at the sametime. The cellular base band modem sends an access request message tothe CE host via the first mailbox, and the CE host responds by sendingan access granted message to the cellular base band modem via the secondmailbox.

There is thus provided in accordance with an embodiment of the presentinvention a cellular handset, including a cellular base band modem,including a UART interface, and an SD host interface, a NAND flashmemory, a NAND controller coupled with the NAND flash memory, a hostdevice including a host controller, wherein the electronic host devicesupports an SD connection, and a convergence controller coupled with thecellular base band modem, the host device and the NAND controller,including a UART port for transferring data to and from the cellularbase band modem via the UART interface, an SD port for transferring datato and from the cellular base band modem via the SD host interface, anSD port for transferring data to and from the NAND flash memory via theNAND controller, an SD port for transferring data to and from the hostdevice via the host controller, a first mailbox into which the base bandmodem writes messages and from which the host device reads messages, anda second mailbox into which the host device writes messages and fromwhich the cellular base band modem reads messages.

There is additionally provided in accordance with an embodiment of thepresent invention a cellular handset, including a cellular base bandmodem, including a UART interface, and an SD host interface, a NANDflash memory, a host device including a host controller, wherein theelectronic host device supports an SD connection, and a convergencecontroller coupled with the cellular base band modem, the host deviceand the NAND controller, including a UART port for transferring data toand from the cellular base band modem via the UART interface, an SD portfor transferring data to and from the cellular base band modem via theSD host interface, a NAND controller coupled with the NAND flash memory,an SD port for transferring data to and from the host device via thehost controller, a first mailbox into which the base band modem writesmessages and from which the host device reads messages, and a secondmailbox into which the host device writes messages and from which thecellular base band modem reads messages.

There is moreover provided in accordance with an embodiment of thepresent invention a method for booting a cellular base band modem,including booting a cellular base band modem in a peripheral mode,reading a boot code image from a NAND flash memory, loading the bootcode image to internal SRAM of the cellular base band modem, executingthe boot code, by the cellular base band modem, loading a full codeimage from the NAND flash memory to the internal SRAM of the cellularbase band modem, and accessing, by the cellular base band mode, the NANDflash memory via an SD port as a standard memory card.

There is further provided in accordance with an embodiment of thepresent invention a method for communicating between a host device and acellular base band mode, including requesting, by a cellular base bandmodem from a host device, access to an SD storage, including writing anaccess request message to a first mailbox, notifying the host device ofthe message in the first mailbox, including issuing an interrupt requestto the host device, reading, by the host device, the message in thefirst mailbox, granting, by the host device, the access request,including writing a grant message to a second mailbox, wherein the grantmessage is the first block of a multi-block write, notifying thecellular base band modem of the message in the second mailbox, includingissuing an interrupt request to the cellular modem, reading, by thecellular base band mode, the message in the second mailbox, includingrecognizing the first block as a grant message, holding an SD host busin a busy state, thereby forcing the host device to hold and not accessthe bus, accessing, by the cellular base band modem, the SD storage, andupon completion of the accessing, removing the busy state from the SDhost bus.

There is yet further provided in accordance with an embodiment of thepresent invention a method for a cellular base band modem to transitionin and out of a sleep mode, including when a cellular base band modem isidle for a long period of time: backing up state parameters in aninternal SRAM, setting a secondary boot code as the code to be executedupon resumption of power, setting a timer for resumption of power,halting internal CPU operation, and disconnecting power to an externalSDRAM, and when the timer has expired: reconnecting power to theexternal SDRAM, loading the secondary boot code, and loading a full codeimage to the external SDRAM.

BRIEF DESCRIPTION OF THE DRAWINGS

The present invention will be more fully understood and appreciated fromthe following detailed description, taken in conjunction with thedrawings in which:

FIG. 1 is a simplified block diagram of a prior art cellular handset;

FIG. 2 is a simplified drawing of a handset coupled with a CE device, inaccordance with an embodiment of the present invention;

FIG. 3 is a simplified block diagram of a cellular handset, inaccordance with a first embodiment of the present invention;

FIG. 4 is a simplified flowchart of a method for booting a cellularmodem and performing subsequent operations, in accordance with anembodiment of the present invention;

FIG. 5 is a simplified flowchart of a method for communicating between aCE host and a cellular base band, and accessing SD storage, inaccordance with an embodiment of the present invention;

FIG. 6 shows a prior art multi-block format for an SD memory card;

FIG. 7A is a simplified diagram illustrating a process of enabling abase band modem to access SD storage, where a convergence controllercoordinates between the base band modem and a CE host, in accordancewith a first embodiment of the present invention;

FIG. 7B is a simplified diagram illustrating a process of enabling abase band modem to access SD storage, where a convergence controllercoordinates between the base band modem and a CE host, in accordancewith a second embodiment of the present invention;

FIG. 8 is a simplified flowchart of a method for a sleep mode, inaccordance with an embodiment of the present invention;

FIG. 9 is a simplified flowchart of a method for resuming operationafter a sleep mode, in accordance with an embodiment of the presentinvention; and

FIG. 10 is a simplified block diagram of a cellular handset, inaccordance with a second embodiment of the present invention.

DETAILED DESCRIPTION

Aspects of the present invention relate to cellular handsets that arecoupled with consumer electronic (CE) host devices, with the hostdevices operating as master and the cellular handsets operating asslave. The cellular handsets enhance and augment the CE host devices byproviding the hosts with modem functionality. In this regard, referenceis now made to FIG. 2, which is a simplified drawing of a handset 200coupled with a CE device 250, in accordance with an embodiment of thepresent invention.

Convergence Controller

A convergence controller is used to couple the CE host device with acellular handset modem. When the host device and the cellular modem arecoupled, they share use of cellular handset NAND flash memory. Theconvergence controller serves as an SD switch box, which connects two SDdevices, namely, the cellular modem and the CE device, and enablesswitching access to SD storage between the two SD devices.

Reference is now made to FIG. 3, which is a simplified block diagram ofa cellular handset 300, in accordance with a first embodiment of thepresent invention. Handset 300 includes a cellular base band modem 310,a dedicated convergence controller 320, a NAND controller 330, and NANDflash memory 340.

Convergence controller 320 is connected to base band modem 310 via botha UART port 322 and a base band SD host port 323. Correspondingly, baseband modem 310 includes a UART interface 312 and an SD interface 314,respectively.

Convergence controller 320 is connected to an SD NAND controller 330 viaan SD port 324. During normal operation, base band modem 310 accessesFlash memory 340 via SD port 324.

Convergence controller 320 also includes an external SD port 325 forconnecting to a consumer electronic (CE) host 350 that supports SDconnections. Handset 300 may plug in to CE host 350 or connect to CEhost 350 via cable. When handset 300 and CE host 350 are connected, CEhost 350 accesses NAND flash memory 340 via convergence controller 320.It is noted that access to NAND flash memory 340 is not required to passthrough base band modem 310. As such, base band modem 310 may be insleep mode or shutdown mode during operations between CE host 350 andNAND flash memory 340.

For memory storage, handset 300 includes an internal SRAM memory 316,and an external memory interface (EMIF) 318 connected to an SDRAM memory360.

Booting Base Band Modem 310

Reference is now made to FIG. 4, which is a simplified flowchart of amethod for booting cellular base band modem 310, and for performingsubsequent operations, in accordance with an embodiment of the presentinvention. At step 410 the base band modem is booted in peripheral mode.In general, when a base band modem is booted in peripheral mode, theinternal ROM code in the modem looks for code that is input via aperipheral interface, including inter alia a UART or a USB interface.The base band modem retrieves such code and transfers it to internalSRAM 316, and then transfers control to SRAM 316.

At step 420 convergence controller 320 reads a secondary boot code imagefrom NAND flash 340, via NAND controller 330. At step 430 convergencecontroller 320 loads the secondary boot code image via its UART port 322to base band modem 310.

At step 440 a boot loader of base band modem 310 loads the secondaryboot code to internal SRAM 316, and begins executing the secondary bootcode. At step 450 the executing code loads the full code image from NANDflash 340 via convergence controller's SD port 324, to internal SRAM 316or to external SDRAM 360, or to both. At step 460, during operation,base band modem 310 accesses NAND flash 340 via convergence controller'sSD port 324, as a standard SD memory card.

Communication Between Base Band Modem 310 and CE Host 350

In accordance with an embodiment of the present invention, base bandmodem 310 communicates with CE host 350 via a controller 355, usingmailboxes implemented in convergence controller 320. Specifically,convergence controller includes two mailboxes, a mailbox 327 that iswritten to by base band modem 310 and read from by CE host 350, and amailbox 328 that is written to by CE host 350 and read from by base bandmodem 310. Convergence controller 320 initiates an interrupt to CEcontroller 355 when base band modem 310 completes a write operation tomailbox 327. Such interrupt may be implemented as an SDIO interrupt onan SD bus, or as a dedicated signal. Similarly, CE controller 355initiates an interrupt to base band modem 310 when CE host 350 completesa write operation to mailbox 328.

It will thus be appreciated by those skilled in the art that mailboxes327 and 328 may be used for direct transfer of data between base bandmodem 310 and CE host 350. In one embodiment of the present invention,each mailbox 327 and 328 includes 512 bytes, of which the first twobytes are header bytes that store a message type, and the remainingbytes store the message itself.

Mailboxes 327 and 328 may be mapped to an SDIO register map on the baseband modem side and on the CE host side. Alternatively, mailboxes 327and 328 may be mapped to SD memory space. In such case an arbitrationalgorithm is used to resolve conflicts when both CE host 350 and baseband modem 310 try to access SD storage at the same time.

Reference is now made to FIG. 5, which is a simplified flowchart of amethod for communicating between CE host 350 and cellular base bandmodem 310, and accessing SD storage 340, in accordance with anembodiment of the present invention. At step 510, base band modem 310requests access to SD storage 340 from the CE host 350, by writing anaccess request message to mailbox 327. At step 520 convergencecontroller 320 issues an interrupt to CE host 350, to notify CE host ofthe message that was written. At step 530 CE host 350 reads the messagefrom mailbox 327.

At step 540 CE host 350 grants the storage access request by writing anaccess granted message to mailbox 328. The write operation at step 540is performed as a multiple block write operation. Multi-block writes aredescribed in the SD specification, Part I: Physical Layer, SimplifiedSpecification Version 2.00, Sep. 25, 2006. In this regard, reference ismade to FIG. 6, which shows a prior art multi-block format for an SDmemory card.

At step 540, the first block of the multi-block write includes the grantof access message, and the rest of the blocks are dummy blocks that arefilled with zeros. At step 550 convergence controller recognizes thefirst block of the message as a grant of access, and holds a busy stateon the SD host bus before reading the second block, thereby forcing CEcontroller 355 to hold and not access the SD bus.

At step 560 base band modem 310 is notified that its access request wasgranted, via a dedicated interrupt line, by reading mailbox 328. Baseband modem 310 can then proceed to access SD storage 340. At step 570base band modem 310 performs its operations on SD storage 340. At step580, upon completion of using SD storage 340, base band modem 310 writesa free message to convergence controller 320. Finally, at step 590convergence controller 320 removes the busy state from the SD host bus.

Generally there is a timeout of 250 msec for a busy period. As such,convergence controller 320 ensures that access to SD storage 340 isshorter than this time.

Reference is now made to FIG. 7A, which is a simplified diagramillustrating a process of enabling a base band modem to access SDstorage, where a convergence controller coordinates between the baseband modem and a CE host, in accordance with a first embodiment of thepresent invention. FIG. 7A is arranged as a time line advancing fromleft to right. Three types of data flow are illustrated along the timeline; namely, a logical arbitration state, communication between CE host350 and convergence controller 320, and communication between cellularbase band modem 310 and convergence controller 320.

Logical arbitration involves a protocol for switching access to SDstorage 340 between base band modem 310 and CE host 350, which share SDstorage 340. As described hereinabove with respect to FIG. 5,arbitration operates by means of access requests and access grantswritten to mailboxes 327 and 328.

Communication between CE host 350 and convergence controller 320, andbetween cellular base band modem 310 and convergence controller 320,occurs via command signals, data signals and interrupt signals. Datablocks are followed by CRC error checking codes.

As shown in FIG. 7A, when cellular base band modem 310 wants to accessSD storage 340, it writes an access request message to the BB→Hostmailbox 327. Thereafter, convergence controller 320 issues an interruptto CE host 350, informing it that there is a message waiting in mailbox327. CE host 350 then reads the access request message in mailbox 327,and writes a multi-block access grant message to Host→BB mailbox 328.Convergence controller 320 recognizes the first block of the multi-blockas an access grant message, and holds a busy state. Convergencecontroller 320 issues an interrupt to base band modem 310, indicatingthat access to SD storage 340 is granted. Base band modem 310 thenaccesses SD storage 340 and performs its requisite operations. Uponcompletion, base band modem 310 writes a release message to convergencecontroller 320, which then releases the busy state. In turn, CE host 350is then able to write the second block (dummies) to Host→BB mailbox 328.

Reference is now made to FIG. 7B, which is a simplified diagramillustrating a process of enabling a base band modem to access SDstorage, where a convergence controller coordinates between the baseband modem and a CE host, in accordance with a second embodiment of thepresent invention. As shown in FIG. 7B, an access grant write command isnot needed, and the reading of the base band modem access requestsuffices to trigger the busy state for CE host 350. Whereas in theembodiment of FIG. 7A a multi-block write by CE host 350 is used togenerate the busy state, in the embodiment of FIG. 7B a single-blockread suffices to initiate the busy state.

Sleep Mode for Base Band Modem 310

Base band modem 310 may be idle for a long period of time if no call ordata exchange is underway and there is time to wait until a nextsignaling session with a cellular network. In such case, base modem 310may drop to a sleep mode. Moreover, in order to conserve powerconsumption in sleep mode, base band modem 310 may shut off SDRAM power,which results in losing the code image on SDRAM 360. In order to enableproper operation, base band modem 310 maintains state parameters ininternal SRAM 316. Alternatively, or in addition, base band modem backsup state parameters in internal SRAM 316 prior to going to sleep.

In this regard, reference is now made to FIG. 8, which is a simplifiedflowchart of a method for a sleep mode, in accordance with an embodimentof the present invention. At step 810 base band modem 310 is idle for along period of time. At step 820 base band modem 310 backs up stateparameters in internal SRAM 316. At step 830 base band modem sets thesecondary boot code that was loaded to SRAM 316 at step 440 as the codeto be executed upon resumption of power. At step 840 base band modem 310sets a timer for resumption of power, halts internal CPU operation, andthen disconnects power to external SDRAM 360.

Reference is now made to FIG. 9, which is a simplified flowchart of amethod for resuming operation after a sleep mode, in accordance with anembodiment of the present invention. At step 910 the timer that was setat step 840 expires. At step 920 power is resumed. At step 930 base bandmodem 310 begins executing the secondary boot code, based on the setupdefined at step 830. Finally, at step 940 the secondary boot code loadsthe code image into external SDRAM 360, and transfers control thereto.

In reading the above description, persons skilled in the art willrealize that there are many apparent variations that can be applied tothe methods and systems described. In particular, components of FIG. 3that are shown integrated may be separated, and components that areshown as separated may be integrated. In this regard, reference is nowmade to FIG. 10, which is a simplified block diagram of a cellularhandset, in accordance with a second embodiment of the presentinvention. In the embodiment illustrated in FIG. 10, an SD NANDcontroller 1030 is integrated within convergence controller 320. Indistinction, SD NAND controller 330 is external to convergencecontroller 320 in FIG. 3.

When SD NAND controller 1030 is integrated within convergence controller320, convergence controller 320 can directly access NAND flash 340. Assuch, at step 420 of FIG. 4, convergence controller 320 reads the bootcode image directly from NAND flash 340, without using an external NANDcontroller.

In the foregoing specification, the invention has been described withreference to specific exemplary embodiments thereof. It will, however,be evident that various modifications and changes may be made to thespecific exemplary embodiments without departing from the broader spiritand scope of the invention as set forth in the appended claims.Accordingly, the specification and drawings are to be regarded in anillustrative rather than a restrictive sense.

1. (canceled)
 2. (canceled)
 3. A method for booting a cellular base bandmodem from NAND flash memory, comprising: booting a cellular base bandmodem in a peripheral mode; reading a secondary boot code image from aNAND flash memory; loading the secondary boot code image to internalSRAM of the cellular base band modem; executing the secondary boot code,by the cellular base band modem; further loading a full code image fromthe NAND flash memory to the internal SRAM of the cellular base bandmodem; and accessing, by the cellular base band mode, the NAND flashmemory via an SD port as a standard memory card.
 4. A method forarbitrating between a host device and a cellular base band mode for useof a shared SD storage, comprising: requesting, by a cellular base bandmodem from a host device, access to an SD storage, comprising writing anaccess request message; notifying the host device of the access requestmessage; reading, by the host device, the access request message;granting, by the host device, the access request, comprising writing anaccess grant message; notifying the cellular base band modem of theaccess grant message; reading, by the cellular base band mode, theaccess grant message; holding an SD host bus in a busy state, therebyforcing the host device to hold and not access the bus; accessing, bythe cellular base band modem, the SD storage; and upon completion ofsaid accessing, removing the busy state from the SD host bus. 5.(canceled)
 6. The method of claim 3 wherein the cellular base band modemis connected to an electronic device that operates as a host, while saidbooting, reading, loading, executing, further loading and accessing areperformed.
 7. The method of claim 6 wherein the electronic device is amember of the group consisting of a media player, a PDA and a GPSnavigational system.
 8. The method of claim 4 wherein said writing anaccess request message comprises writing the access request message to afirst mailbox.
 9. The method of claim 4 wherein said writing an accessgrant message comprises writing the access grant message to a secondmailbox.
 10. The method of claim 4 wherein said notifying the hostdevice comprises issuing an interrupt to the host device.
 11. The methodof claim 4 wherein said notifying the cellular base band modem comprisesissuing an interrupt to the cellular base band modem.
 12. The method ofclaim 4 further comprising limiting said accessing to no longer than abusy period timeout.
 13. The method of claim 4 wherein the grant messageis the first block of a multi-block write, and wherein said holdingcomprises preventing the host device from writing subsequent blocks ofthe multi-block write.
 14. The method of claim 4 further comprising,upon completion of said accessing, writing, by the cellular base bandmodem, a release message.
 15. The method of claim 4 wherein the hostdevice is a member of the group consisting of a media player, a PDA anda GPS navigational system.
 16. A method for arbitrating between a hostdevice and a cellular base band mode for use of a shared SD storage,comprising: requesting, by a cellular base band modem from a hostdevice, access to an SD storage, comprising writing an access requestmessage; notifying the host device of the access request message;reading, by the host device, the access request message; holding an SDhost bus in a busy state, thereby forcing the host device to hold andnot access the bus; accessing, by the cellular base band modem, the SDstorage; and upon completion of said accessing, removing the busy statefrom the SD host bus.
 17. The method of claim 16 wherein said writing anaccess request message comprises writing the access request message to amailbox.
 18. The method of claim 16 wherein said notifying the hostdevice comprises issuing an interrupt to the host device.
 19. The methodof claim 16 further comprising limiting said accessing to no longer thana busy period timeout.
 20. The method of claim 16 further comprising,upon completion of said accessing, writing, by the cellular base bandmodem, a release message.
 21. The method of claim 16 wherein saidholding comprises preventing the host device from performing a singleblock read.
 22. The method of claim 16 wherein the host device is amember of the group consisting of a media player, a PDA and a GPSnavigational system.